package org.wyz.factory;

public class CarFactory {

    public static Car createCar(String name) {
        if(name.equals("tesla")) {
            return new Tesla();
        } else if(name.equals("benz")) {
            return new Benz();
        } else
            return null;
    }
}
